<template>
  <el-dialog
    title="登录记录"
    :visible.sync="$attrs.visable"
    width="600px"
    :before-close="handleClose"
  >
    <el-table v-loading="loading" class="commtable" :data="tableList">
      <el-table-column
        label="时间"
        min-width="260"
        prop="id"
        :show-overflow-tooltip="true"
      />
      <el-table-column
        label="动作"
        prop="email"
        min-width="180px"
        :show-overflow-tooltip="true"
      />
      <el-table-column
        label="原因"
        prop="phonenumber"
        min-width="160"
        :show-overflow-tooltip="true"
      />
    </el-table>
    <span slot="footer" class="dialog-footer">
      <el-button size="small" @click="handleClose">取 消</el-button>
      <el-button size="small" type="primary" @click="handleClose"
        >确 定</el-button
      >
    </span>
  </el-dialog>
</template>

<script>
import { loginRecord } from '@/api/system/tgwechat'
export default {
  data() {
    return {
      loading:false,
      tableList:[],
    };
  },
  created(){
    // this.getList()
  },
  methods: {
    getList(){
      loginRecord().then(res=>{
        this.tableList = res.rows
      })
    },

    handleClose() {
      this.$emit('update:visable',false)
      // this.$emit("close"); //关闭弹窗;
    },
  },
};
</script>
<style lang="scss" scoped>
.custom-node {
  border-radius: 4px;
  &.active {
    background-color: #ebf2ff;
  }
}
</style>